<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>添加新公告信息</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="assets/layui/css/layui.css">
  <link rel="stylesheet" href="assets/css/all.css" />
 	<style>
 		.layui-form-select dl{
 			z-index: 9999;
 		}
 	</style>
</head>
	<body class="addnews" style="padding:20px 0">
		<!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
		<!--[if lt IE 9]>
		  <script src="assets/js/html5.min.js"></script>
		  <script src="assets/js/respond.min.js"></script>
		<![endif]-->   
		<form class="layui-form" action="">
		  <div class="layui-form-item">
		    <label class="layui-form-label">标题</label>
		    <div class="layui-input-inline">
		      <input type="text" name="title" lay-verify="required" autocomplete="off" placeholder="请输入标题" class="layui-input">
		    </div>
		  </div>
		  <div class="layui-form-item">
			      <label class="layui-form-label">接收部门</label>
			      <div class="layui-input-inline">
			        <select name="bumen" lay-verify="required">
			          <option value="">请选择部门</option>
			          <option value="第三方拍卖公司">第三方拍卖公司</option>
			          <option value="北京分公司">北京分公司</option>
			          <option value="上海分公司">上海分公司</option>
			        </select>
			      </div>
			</div>
			<div class="layui-form-item">
			      <label class="layui-form-label">接收人</label>
			      <div class="layui-input-inline">
			        <select name="recevier" lay-verify="required">
			          <option value="">请选择</option>
			          <option value="聚车拍卖公司">聚车拍卖公司</option>
			          <option value="聚车拍卖公司">聚车拍卖公司</option>
			          <option value="聚车拍卖公司">聚车拍卖公司</option>
			        </select>
			      </div>
			</div>
			<div class="layui-form-item layui-form-text">
		    <label class="layui-form-label">公告内容</label>
		    <div class="layui-input-inline">
		      <!--<textarea id="addNewsArea" name="content" placeholder="请输入内容" class="layui-textarea" lay-verify=""></textarea>-->
		      <script id="newsContainer" name="content" type="text/plain" style="width:800px;height: 300px;">请输入公告内容</script>
		    </div>
		  </div>
		  <div class="layui-form-item">
		    <label class="layui-form-label">发布人</label>
		    <div class="layui-input-inline">
		      <input type="text" name="publisher" lay-verify="required" autocomplete="off" placeholder="请输入" class="layui-input">
		    </div>
		  </div>
		  <div class="layui-form-item">
		    <label class="layui-form-label">发布时间</label>
		    <div class="layui-input-inline">
		       <input type="text" name="fbdate" id="fbdate" lay-verify="required" placeholder="年-月-日  时：分：秒" autocomplete="off" class="layui-input layui-date">
		    </div>
		  </div>
		  <div class="layui-form-item">
		    <div class="layui-input-block">
		       <button class="layui-btn" lay-submit="" lay-filter="ljfb">立即发布</button>
		    </div>
		  </div>
		</form>
		
    <!-- 富文本编辑器配置文件 -->
    <script type="text/javascript" src="assets/ueditor/ueditor.config.js"></script>
    <!-- 编辑器源码文件 -->
    <script type="text/javascript" src="assets/ueditor/ueditor.all.js"></script>
    <!-- 实例化编辑器 -->
    <script type="text/javascript">
        var ue = UE.getEditor('newsContainer');
    </script>
    <script src="assets/layui/layui.js"></script>
		<script src="assets/js/all.js"></script>
    <script type="text/javascript">
    	layui.use(['form'],function(){
    		var form = layui.form,
    				$ = layui.$
    			//监听添加新公告弹框页面的提交
					form.on('submit(ljfb)', function(data) {
				//		var title = data.field.title;
				//		var bumen = data.field.bumen;
				//		var content = data.field.content;
						console.log(JSON.stringify(data.field));
				//		$.post(quark_posts_add_api, param,
				//			function(data) {
				//				if(data.status == 200) {
				//					layer.msg("发布成功", {
				//						icon: 1
				//					});
				//				} else if(data.status == 400) {
				//					layer.msg(data.error, {
				//						icon: 7
				//					});
				//				} else {
				//					layer.msg(data.error, {
				//						icon: 5
				//					});
				//				}
				//			}, "json");
						return false;
					});
					//封装查询参数
				    function getData(data){
				        var param = {};
				        param.title = data.title;
				        param.content = data.content;
				        param.labelId = data.labelId;
				        param.token = getCookie();
				        return param;
				    }
    	})
    </script>
	</body>
</html>
